package org.study.mybatisplus.dynamic.boot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.study.mybatisplus.dynamic.boot.model.IotLog;

import java.util.List;
import java.util.Map;

/**
 * 设备通信报文日志Mapper
 *
 * @author doveylovey
 * @version v1.0.0
 * @email 1135782208@qq.com
 * @date 2025年02月17日
 */
@Mapper
public interface IotLogMapper extends BaseMapper<IotLog> {
    List<Map<String, Object>> selectAllData(@Param("tableName") String tableName,
                                            @Param("columnList") List<String> columnList,
                                            @Param("startTime") String startTime,
                                            @Param("endTime") String endTime,
                                            @Param("limit") Integer limit);

    int batchInsertByMap(@Param("tableName") String tableName,
                         @Param("dataList") List<Map<String, Object>> dataList);

    int batchInsertByObj(@Param("tableName") String tableName,
                         @Param("dataList") List<IotLog> dataList);
}
